using System;
using System.Collections.Generic;
using System.Web.Mvc;

namespace JiravaNet.Web.UI.Fieldset {
	/// <summary>
	/// Trida pro uchovani informaci o polozce fieldsetu
	/// </summary>
	public class FieldsetItem {

		/// <summary>
		/// Jmeno formularoveho pole
		/// </summary>
		public string Name { get; set; }

		/// <summary>
		/// Nadpisek
		/// </summary>
		public string Header { get; set; }

		/// <summary>
		/// Hodnota
		/// </summary>
		public string Value { get; set; }


		private List<Func<HtmlHelper, string>> _actions;

		/// <summary>
		/// Seznam akci, ktere se maji nad formularovou polozkou provest
		/// </summary>
		public List<Func<HtmlHelper, string>> Actions {
			get {
				if (_actions == null) {
					_actions = new List<Func<HtmlHelper, string>>();
				}
				return _actions;
			}
		}
	}
}